<!-- {{nextTitle}} -->
  <form class="form-horizontal" role="form" novalidate name="stForm" ng-init="initQuery()">
    <div class="form-ctrl md-whiteframe-z1">
      <div class="form-search" style="height:270px;" ng-class="{true: 'shou'}[shoumun.flag==0]" ng-switch on="selector.translate.timeTypeCode">
      <!-- 业务系统 -->
        <div>
          <label style="width:70px">业务系统</label>
          <md-select ng-model="selector.translate.systemCode" ng-change="changeSys(selector.translate.systemCode)" required>
            <md-option ng-value="sys.systemCode" ng-repeat="sys in selector.system">{{sys.systemName}}</md-option>
          </md-select>
        </div>
      <!-- 业务名称 -->
        <div>
          <label style="width:70px">业务名称</label>
          <md-select ng-model="selector.translate.businessCode"  ng-click="queryBusiness(selector.translate.system)" placeholder='{{place}}' required>
            <md-option ng-value="bus.businessCode" ng-repeat="bus in selector.business">{{bus.businessName}}</md-option>
          </md-select>
        </div>
      <!-- 省份 -->
        <div>
          <label style="width:70px">省份</label>
          <md-select multiple ng-model="selector.translate.province"required>
            <md-select-label>
              {{selector.translate.province.length ? _getNames(selector.translate.province,'provinceName',selector.province) :'广东'}}
            </md-select-label>
           <!--  <md-option ng-value="" ng-click="_checkAll(selector.translate,'province')">全部</md-option> -->
            <md-option ng-value="pro" ng-repeat="pro in selector.province">{{pro.provinceName}}</md-option>
          </md-select>
        </div>
      <!-- 时间粒度   -->
        <div>
          <label style="width:70px">时间粒度</label>
          <md-select ng-model="selector.translate.timeTypeCode" >
            <md-option ng-value="tim.timeTypeCode" ng-repeat="tim in selector.timeTypes">{{tim.timeTypeName}}</md-option>
          </md-select>
        </div>

        <div ng-switch-when="1">
         <md-input-container  flex>
           <label>开始时间</label>
           <input ng-model="selector.translate.startTime"  type="date" end-time="selector.translate.endTime" time-validate="day" name="kaishi" required></input>
           <div ng-messages="stForm.kaishi.$error">
             <div ng-message="date">请正确输入时间</div>
             <div ng-message="time-error">结束时间不应小于开始时间</div>
           </div>
         </md-input-container>
       </div>
       <div ng-switch-when="1">
        <md-input-container flex>
          <label>结束时间</label>
          <input ng-model="selector.translate.endTime"  type="date" start-time="selector.translate.startTime" time-validate="day" name="jieshu" required></input>
          <div ng-messages="stForm.jieshu.$error">
            <div ng-message="date">请正确输入时间</div>
            <div ng-message="time-error">结束时间不应小于开始时间</div>
            <div ng-message="too-great">结束时间不应大于当前时间</div>
          </div>
        </md-input-container>
      </div>


        <div ng-switch-when="3">
         <md-input-container  flex>
           <label>开始时间</label>
           <input ng-model="selector.translate.startTime"  type="month" end-time="selector.translate.endTime" time-validate="month" name="kaishi" required></input>
           <div ng-messages="stForm.kaishi.$error">
             <div ng-message="date">请正确输入时间</div>
             <div ng-message="time-error">结束时间不应小于开始时间</div>
           </div>
         </md-input-container>
       </div>
       <div ng-switch-when="3">
        <md-input-container flex>
          <label>结束时间</label>
          <input ng-model="selector.translate.endTime"  type="month" start-time="selector.translate.startTime" time-validate="month" name="jieshu" required></input>
          <div ng-messages="stForm.jieshu.$error">
            <div ng-message="date">请正确输入时间</div>
            <div ng-message="time-error">结束时间不应小于开始时间</div>
            <div ng-message="too-great">结束时间不应大于当前时间</div>
          </div>
        </md-input-container>
      </div>
      <div class="menus">
        <md-button class="md-raised" ng-click="resetForm()">重置</md-button>
      </div>

    </div>
     <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show = 'shoumun.flag==1&&!stForm.$invalid' ng-click="shoumun.flag=0"></i>
    <md-button ng-click="shoumun.flag==1?shoumun.flag=0:shoumun.flag=1;searchST()"  class="md-fab md-primary md-hue-1" aria-label="Profile">
     <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;" ng-show="shoumun.flag==0"></i>
     <i class="glyphicon glyphicon-search" ng-show="shoumun.flag==1"></i>
    </md-button>
    <!-- ng-disabled="stForm.$invalid" -->
  </div>
 </form>
    <div class="menus">
     <md-button class="md-raised" ng-click="addP($event)">新增</md-button>
     <md-button class="md-raised" ng-click="modifyP($event)">修改</md-button>
     <!-- <md-button class="md-raised" ng-click="delP()">删除</md-button> -->
     </br>
    </div>
    <div class="table-info">
          <div class="table-detail" >
            <div class="t_r">
              <table class="table table-bordered">
                <thead>
                  <tr>
                    <th width="8%" >
                      <!-- <md-checkbox ng-checked='user.checked' ng-click='getIds(user)' style="margin: 0px;"></md-checkbox> -->
                    </th>
                    <th width="20%">省市</th>
                    <th width="20%">系统</th>
                    <th width="20%">业务</th>
                    <th width="20%">时间粒度</th>
                    <th width="12%">操作</th>
                  </tr>
                </thead>
                <tbody>
                  <tr ng-repeat = 'user in  checkli'>
                    <td width="8%" ng-click='user.checked = !user.checked'>
                      <md-checkbox ng-checked='user.checked' ng-click='getIds(user.ob)' aria-label="checkBox" style="margin: 0px;"></md-checkbox>
                    </td>
                    <td width="20%">{{ user.ob }}</td>
                    <td width="20%">{{ ssyy }}</td>
                    <td width="20%">{{ bbuu }}</td>
                    <td width="20%">天</td>
                    <td width="12%" ng-click="watchForm(user)">查看</td>
                  </tr>

                  <tr ng-if="addLi.isAdd">
                    <td width="8%" ng-click='user.checked = !user.checked'>
                      <md-checkbox ng-checked='user.checked' ng-click='getIds(addLi.proName)' aria-label="checkBox" style="margin: 0px;"></md-checkbox>
                    </td>
                    <td width="20%">{{ addLi.proName }}</td>
                    <td width="20%">{{ addLi.sysName }}</td>
                    <td width="20%">{{ addLi.busName }}</td>
                    <td width="20%">{{ addLi.timeT }}</td>
                    <td width="12%" ng-click="watchAddForm(addLi)">查看</td>
                  </tr>

                </tbody>
              </table>
            </div>
          </div>

          <div ng-if="htmlData.queryResult.isQuery">
            <ds-page
             total-count="htmlData.queryResult.totalCount"
             page-size= "htmlData.queryParam.page.pageSize"
             page-itmes="pageItmes"
             param = "htmlData.queryParam"
             current-page="htmlData.queryParam.page.currentPage"
             go-page="queryResultPage(htmlData.queryParam)"
             page-size-change="pageSizeChange(htmlData.queryParam.page.pageSize)"
             show-max-page="5"
             first-text="<<"
             last-text=">>"
             previous-text="<"
             next-text=">"
           </ds-page>
          </div>
      </div>
 <!-- <core-loading ng-show= 'load.flag'></core-loading> -->
<div id="bbj"></div>
